#!/usr/bin/env bash

echo "deploying dev"
if [[ -z $(docker ps -q -f "name=^user_rpc:dev$") ]]; then
  cd deployments/dev && docker compose up -d && cd ../..
  echo "dev deployed"
else
  echo "dev already deployed"
  echo "stop old dev"
  cd deployments/dev && docker compose down
  echo "deploying new dev"
  docker compose up -d && cd ../..
fi